package com.zqz.smp.springboot_mybatis_plus.bean;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.io.Serializable;

@Data
@Setter
@Getter
@ToString
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("返回对象")
/**
 * JsonJsonInclude.Include.NON_NULL这个最常用，
 * 即如果加该注解的字段为null,那么就不序列化这个字段了
 * 意思就是说为null的时候就不会把实体类序列化为json字段
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Result implements Serializable {
    @ApiModelProperty("状态码")
    private String code;
    @ApiModelProperty("返回消息")
    private String message;
    @ApiModelProperty("返回对象")
    private Object data;
}
